package com.ruoyi.fs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fs.mapper.FsCaseFileMapper;
import com.ruoyi.fs.domain.FsCaseFile;
import com.ruoyi.fs.service.IFsCaseFileService;

/**
 * 案件文件Service业务层处理
 * 
 * @author hero
 * @date 2024-10-12
 */
@Service
public class FsCaseFileServiceImpl implements IFsCaseFileService 
{
    @Autowired
    private FsCaseFileMapper fsCaseFileMapper;

    /**
     * 查询案件文件
     * 
     * @param caseId 案件文件主键
     * @return 案件文件
     */
    @Override
    public FsCaseFile selectFsCaseFileByCaseId(Long caseId)
    {
        return fsCaseFileMapper.selectFsCaseFileByCaseId(caseId);
    }

    /**
     * 查询案件文件列表
     * 
     * @param fsCaseFile 案件文件
     * @return 案件文件
     */
    @Override
    public List<FsCaseFile> selectFsCaseFileList(FsCaseFile fsCaseFile)
    {
        return fsCaseFileMapper.selectFsCaseFileList(fsCaseFile);
    }

    /**
     * 新增案件文件
     * 
     * @param fsCaseFile 案件文件
     * @return 结果
     */
    @Override
    public int insertFsCaseFile(FsCaseFile fsCaseFile)
    {
        fsCaseFile.setCreateTime(DateUtils.getNowDate());
        return fsCaseFileMapper.insertFsCaseFile(fsCaseFile);
    }

    /**
     * 修改案件文件
     * 
     * @param fsCaseFile 案件文件
     * @return 结果
     */
    @Override
    public int updateFsCaseFile(FsCaseFile fsCaseFile)
    {
        fsCaseFile.setUpdateTime(DateUtils.getNowDate());
        return fsCaseFileMapper.updateFsCaseFile(fsCaseFile);
    }

    /**
     * 批量删除案件文件
     * 
     * @param caseIds 需要删除的案件文件主键
     * @return 结果
     */
    @Override
    public int deleteFsCaseFileByCaseIds(Long[] caseIds)
    {
        return fsCaseFileMapper.deleteFsCaseFileByCaseIds(caseIds);
    }

    /**
     * 删除案件文件信息
     * 
     * @param caseId 案件文件主键
     * @return 结果
     */
    @Override
    public int deleteFsCaseFileByCaseId(Long caseId)
    {
        return fsCaseFileMapper.deleteFsCaseFileByCaseId(caseId);
    }
}
